package graduation.project.body;

public class Result {
	
	private String expression; 
	private boolean detected;
	
	public Result(){
	}
	public Result(String expression, boolean detected){
		this.expression = expression;
		this.detected = detected;
	}
	
	public String getExpression() {
		return expression;
	}
	public void setExpression(String expression) {
		this.expression = expression;
	}
	public boolean isDetected() {
		return detected;
	}
	public void setDetected(boolean detected) {
		this.detected = detected;
	}
	
	public boolean equals(Object obj){
		if(!(obj instanceof Result))
			return false;
		if(obj == null)
			return false;
		
		Result r = (Result)obj;
		if(r.getExpression().equals(expression) && r.isDetected() != detected)
			return true;		
		return false;
	}
	
	public String toString(){
		return "The mutant is " + expression + ", is detected: " + detected + ".";
	}
}
